package commom.job;

import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;

import java.text.SimpleDateFormat;
import java.util.Date;

public class HelloWorldJob implements Job {


    @Override
    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {

        String strTime = new SimpleDateFormat("HH-mm-ss").format(new Date());
        System.err.println( strTime + ":Hello World！");
        System.err.println("JobDetail'name:" + jobExecutionContext.getJobDetail().getKey().getName());
        System.err.println("JobDetail'group:" + jobExecutionContext.getJobDetail().getKey().getGroup());
        System.err.println("JobDetail'class:" + jobExecutionContext.getJobDetail().getClass());

    }
}
